package com.ygqh.baby.mapper;

import com.ygqh.baby.po.YgBargainDetail;
import com.ygqh.baby.po.YgBargainDetailExample;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface YgBargainDetailMapper {
    int countByExample(YgBargainDetailExample example);

    int deleteByExample(YgBargainDetailExample example);

    int deleteByPrimaryKey(Long id);

    int insert(YgBargainDetail record);

    int insertSelective(YgBargainDetail record);

    List<YgBargainDetail> selectByExample(YgBargainDetailExample example);

    YgBargainDetail selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") YgBargainDetail record, @Param("example") YgBargainDetailExample example);

    int updateByExample(@Param("record") YgBargainDetail record, @Param("example") YgBargainDetailExample example);

    int updateByPrimaryKeySelective(YgBargainDetail record);

    int updateByPrimaryKey(YgBargainDetail record);

    int addBatch(@Param("addList") List<YgBargainDetail> addList);

    int updateBatchByIdSelective(@Param("updateList") List<YgBargainDetail> updateList);

    List<Long> getProductIdsInOtherBargain(@Param("excludedBargainId") Long excludedBargainId, @Param("productIdList") List<Long> productIdList,
                                           @Param("startDate") Date startDate, @Param("endDate") Date endDate);
    List<YgBargainDetail> selectDetailByBargainId(@Param("bargainId") Long bargainId);
}